#include "avl_tree.h"
#include <stdio.h>

int main() {

  const int a[] = {3, 2, 1, 4, 5, 6, 7, 10, 9, 8};
  avl_node root = NULL;
  avl_node tempNode;

  for (int i = 0; i < 10; i++) {
    tempNode = search(root, a[i]);

    if (tempNode != NULL)
      printf("\n\t %d Already exists in the tree\n", a[i]);
    else {
      printf("begining insert node: %d\n", a[i]);
      root = insert(root, a[i]);
    }
  }

  printf("\n in_oder:\n");
  in_order(root);
  printf("\n pre_oder:\n");
  pre_order(root);

  return 0;
}